package com.situ.day38.thread;

public class ThreadDemo {

    public static void main(String[] args) {
        MyRunnable myRunnable = new MyRunnable();
        Thread thread = new Thread(myRunnable);
        thread.start();
    }

    public static void main1(String[] args) {
        MyThread myThread = new MyThread();
        //这不是启动一个线程，这是调用对象里面一个普通的方法run
        //myThread.run();
        //真正启动线程调用start方法，执行代码就是run方法里面代码
        myThread.start();
    }
}
